﻿using System.Drawing;

namespace com.uplus.common
{
    /// <summary>
    /// 提供图片服务
    /// @赵晨亮, 2011-02-25
    /// </summary>
    public class ImgMgr
    {
        #region GetSubImage
        /// <summary>
        /// 获取原图指定区域的图片
        /// </summary>
        /// <param name="img"></param>
        /// <param name="rectangle"></param>
        /// <returns></returns>
        //public static Bitmap GetSubImage(Image img, Rectangle rectangle)
        //{
        //    Bitmap bt = new Bitmap(rectangle.Width, rectangle.Height);
        //    Graphics gh = Graphics.FromImage(bt);

        //    gh.DrawImage(img,
        //        -rectangle.Left,
        //        -rectangle.Top,
        //        img.Width,
        //        img.Height);
        //    gh.Dispose();

        //    return bt;
        //}
        #endregion
    }
}
